const CryptoJS = require('crypto-js');

const plainPassword = 'admin123';
const md5Hash = CryptoJS.MD5(plainPassword).toString();

console.log('明文密码:', plainPassword);
console.log('MD5 哈希:', md5Hash);
console.log('');

// 模拟登录验证
const inputPassword = 'admin123';
const hashedInputPassword = CryptoJS.MD5(inputPassword).toString();

console.log('用户输入密码:', inputPassword);
console.log('用户输入密码的MD5:', hashedInputPassword);
console.log('密码匹配:', md5Hash === hashedInputPassword);
